package com.leonzhangxf.server.service;

import com.leonzhangxf.service.IUserService;
import org.springframework.stereotype.Service;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @author leonzhangxf
 */
@Service
public class UserServiceImpl implements IUserService {

    @Override
    public String sayHello(String msg) {
        try {
            Thread.sleep(ThreadLocalRandom.current().nextLong(1000));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(String.format("hello %s", msg));
        return "success";
    }
}
